-- GENERATED SPELL FOR [Astral Spark] --


function spell0_17283(pUnit, Event) --@Detonate,Self--
pUnit:FullCastSpellOnTarget(29876,pUnit)
pUnit:RegisterEvent('Sorts_17283', 8000, 1)
end

function spell1_17283(pUnit, Event) --@Sear,Self--
pUnit:FullCastSpellOnTarget(29864,pUnit)
pUnit:RegisterEvent('Sorts_17283', 588, 1)
end

function Sorts_17283(pUnit, Event)
local choix_sorts_17283 = math.random(0, 1)
if choix_sorts_17283 == 0 then
pUnit:RegisterEvent('spell0_17283', 1, 1)
end
if choix_sorts_17283 == 1 then
pUnit:RegisterEvent('spell1_17283', 1, 1)
end
end

function mob17283_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17283', math.random(1500, 3000), 1)
end

function mob17283_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17283_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17283_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17283, 1, 'mob17283_Action')
RegisterUnitEvent(17283, 2, 'mob17283_Leave')
RegisterUnitEvent(17283, 3, 'mob17283_Kill')
RegisterUnitEvent(17283, 4, 'mob17283_Die')
